
<div>
    <div style="text-align: right;">
        <ol class="breadcrumb">
            <li><a href="#">直报后台管理</a></li>
            <li class="active">角色管理</li>
        </ol>
    </div>
</div>

<div>

    <div>
        <!-- Nav tabs -->
        <ul class="nav nav-tabs hidden" role="tablist">
            <li role="presentation" class="active"><a href="#rolelist" aria-controls="rolelist" role="tab" data-toggle="tab">角色列表</a></li>
            <li role="presentation"><a href="#addrole" aria-controls="addrole" role="tab" data-toggle="tab">新建角色</a></li>
            <li role="presentation"><a href="#modifyrole" aria-controls="modifyuser" role="tab" data-toggle="tab">修改角色</a></li>
            <li role="presentation"><a href="#roleuserlist" aria-controls="roleuserlist" role="tab" data-toggle="tab">设置角色用户</a></li>
            <li role="presentation"><a href="#adduser" aria-controls="adduser" role="tab" data-toggle="tab">可选角色用户</a></li>
            <li role="presentation"><a href="#permissionlist" aria-controls="permissionlist" role="tab" data-toggle="tab">设置角色权限</a></li>
            <li role="presentation"><a href="#permission" aria-controls="permission" role="tab" data-toggle="tab">已选角色权限</a></li>
            <li role="presentation"><a href="#menuTreeModal" aria-controls="menuTreeModal" role="modal" data-toggle="modal">设置角色菜单</a></li>
        </ul>

        <!-- Tab panes -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane fade active in" id="rolelist" mt-layout="{ spacing_open:0 }">
                <div mt-url="tmpl/rolelist.html" ng-controller="myRoleTableController">
                </div>
                <div  ng-controller="buttonController">
                    <button class="btn btn-primary" href="#addrole" aria-controls="addrole" role="tab" data-toggle="tab" mt-tab>新建角色</button>
                    <button class="btn btn-primary" href="#modifyrole" aria-controls="modifyrole" role="tab" data-toggle="tab" mt-tab ng-disabled="selected.length!=1">修改角色</button>
                    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal" ng-disabled="selected.length==0">删除角色</button>
                    <button class="btn btn-primary" href="#roleuserlist" aria-controls="roleuserlist" role="tab" data-toggle="tab" mt-tab ng-disabled="selected.length!=1">设置角色用户</button>
                    <!--<button  class="btn btn-primary" ng-click="pushingdata()">推送数据</button>-->
                    <!-- <button class="btn btn-primary" href="#permission" aria-controls="permission" role="tab" data-toggle="tab" mt-tab ng-disabled="selected.length!=1">设置角色权限(老系统功能)</button> -->
                </div>
            </div>
            <div role="tabpanel" class="tab-pane fade" id="addrole" ng-controller="addRoleController">
                <div >
                    <ol class="breadcrumb">
                        <li>用户和权限</li>
                        <li><a href="../../user/role">角色管理</a></li>
                        <li class="active">新建角色</li>
                    </ol>
                </div>
                <div mt-url="tmpl/addrole.html"></div>
            </div>
            <div role="tabpanel" class="tab-pane fade" id="modifyrole" ng-controller="modifyRoleController">
                <div >
                    <ol class="breadcrumb">
                        <li>用户和权限</li>
                        <li><a href="../../user/role">角色管理</a></li>
                        <li class="active">修改角色</li>
                    </ol>
                </div>
                <div mt-url="tmpl/modifyrole.html"></div>
            </div>
<!--             <div role="tabpanel" class="tab-pane fade" id="userlist" mt-layout="{ spacing_open:0 }" ng-controller="myRoleUserController">
                <div class="ui-layout-north">
                    <ol class="breadcrumb">
                        <li>用户和权限</li>
                        <li><a href="../../user/role">角色管理</a></li>
                        <li class="active">设置角色用户</li>
                    </ol>
                </div>
                <div class="ui-layout-center" mt-url="tmpl/userlist.html">
                </div>
                <div class="ui-layout-south">
                    <a class="btn btn-primary" href="#rolelist" aria-controls="rolelist" role="tab" data-toggle="tab" ng-click="ok()">保存</a>&nbsp;
                    <a class="btn btn-default" href="#rolelist" aria-controls="rolelist" role="tab" data-toggle="tab">取消</a>
                </div>
            </div> -->
            <div role="tabpanel" class="tab-pane fade" id="roleuserlist" mt-layout="{ spacing_open:0 }" ng-controller="myRoleUserListController">
                <div >
                    <ol class="breadcrumb">
                        <li>用户和权限</li>
                        <li><a href="../../user/role">角色管理</a></li>
                        <li class="active">角色用户列表</li>
                    </ol>
                </div>
                <div  mt-url="tmpl/roleuserlist.html">
                </div>
                <div >
                    <a class="btn btn-primary"  href="#adduser" aria-controls="adduser" role="tab" data-toggle="tab" >添加用户</a>&nbsp;
                    <a class="btn btn-default" href="#rolelist" aria-controls="rolelist" role="tab" data-toggle="tab">取消</a>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane fade" id="adduser" mt-layout="{ spacing_open:0 }" ng-controller="addUserController">
                <div >
                    <ol class="breadcrumb">
                        <li>用户和权限</li>
                        <li><a href="../../user/role">角色管理</a></li>
                        <li class="active">选择用户</li>
                    </ol>
                </div>
                <div  mt-url="tmpl/selectuserlist.html">
                </div>
                <div >
                    <a class="btn btn-primary"  aria-controls="addUser" ng-click="addUser()" >添加选中用户</a>&nbsp;
                    <a class="btn btn-default" href="#roleuserlist" aria-controls="roleuserlist" role="tab" data-toggle="tab">取消</a>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane fade" id="permission" mt-layout="{ spacing_open:0 }" ng-controller="myRolePermissionController">
                <div >
                    <ol class="breadcrumb">
                        <li>用户和权限</li>
                        <li><a href="../../user/role">角色管理</a></li>
                        <li class="active">权限列表</li>
                    </ol>
                </div>
                <div mt-url="tmpl/permission.html">
                </div>
                <div class="ui-layout-south">
                    <a class="btn btn-primary" href="#permissionlist" aria-controls="permissionlist" role="tab" data-toggle="tab" >添加权限</a>&nbsp;
                    <a class="btn btn-default" href="#rolelist" aria-controls="rolelist" role="tab" data-toggle="tab">取消</a>
                </div>
            </div>

           <div role="tabpanel" class="tab-pane fade" id="permissionlist" mt-layout="{ spacing_open:0 }" ng-controller="addqx">
                <div class="ui-layout-north">
                    <ol class="breadcrumb">
                        <li>用户和权限</li>
                        <li><a href="../../user/role">权限管理</a></li>
                        <li class="active">选择权限</li>
                    </ol>
                </div>
                <div class="ui-layout-center" mt-url="tmpl/permissionlist.html">
                </div>
                <div class="ui-layout-south">
                    <a class="btn btn-primary"  aria-controls="addqx" ng-click="ok()" >添加选中权限</a>&nbsp;
                    <a class="btn btn-default" href="#permission" aria-controls="permission" role="tab" data-toggle="tab">取消</a>
                </div>
            </div> 
            
        </div>
    </div>
    </div>
<div mt-url="tmpl/removeroledlg.html" ng-controller="deleteRoleController"></div>
<div mt-url="tmpl/menutreedlg.html" ng-controller="menuTreeController"></div>